package com.myfum.mobile.tetris.views
{
	import com.myfum.mobile.tetris.Config;
	
	import flare.basic.Viewer3D;
	
	import flash.display.Bitmap;
	import flash.display.BitmapData;
	import flash.display.Sprite;
	
	public class TetrisStage extends Sprite
	{
		private var bitmap:Bitmap;
		
		public function TetrisStage()
		{
			super();
			init();
		}
		
		private function init():void{
			bitmap = new Bitmap(new BitmapData(Config.STAGE_WIDTH*Config.CUBE_SIZE, Config.STAGE_HEIGHT*Config.CUBE_SIZE, true, 0xffffff));
			//addChild(bitmap);
		}
		
		public function clear():void{
			removeChild(bitmap);
			bitmap.bitmapData.dispose();
			bitmap = new Bitmap(new BitmapData(Config.STAGE_WIDTH*Config.CUBE_SIZE, Config.STAGE_HEIGHT*Config.CUBE_SIZE, true, 0xffffff));
			//addChild(bitmap);
		}
		
		public function getBitmap():Bitmap{
			return bitmap;
		}
	}
}